﻿<%@ Page Title="Information Management System" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="ChangePassword.aspx.cs" Inherits="CARMS.Admin.ChangePassword" %>

<%@ Register Src="~/Controls/RequiredMark.ascx" TagName="Requiredmark" TagPrefix="Ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
                <div style="height:10px"></div>
            <vs:FormPanel RepeatColumns="1" ID="formPanelChangePwd" runat="server">
                <Items>
                    <vs:FormItem HeaderText="Original Password">
                        <ContentTemplate>
                            <asp:TextBox TextMode="Password" runat="server" TabIndex="10" ID="txtOldPassword" MaxLength="50"></asp:TextBox>
                            <Ucc:Requiredmark ID="Requiredmark1" runat="server" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOldPassword"
                                Display="Dynamic" ErrorMessage="Please input original password. " SetFocusOnError="True"></asp:RequiredFieldValidator>
                        </ContentTemplate>
                    </vs:FormItem>
                    <vs:FormItem HeaderText="New Password">
                        <ContentTemplate>
                            <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" TabIndex="20" MaxLength="50"></asp:TextBox>
                            <Ucc:Requiredmark ID="Requiredmark2" runat="server" />
                            <asp:RegularExpressionValidator Display="Dynamic" ID="RegularExpressionValidator1"
                                runat="server" ValidationExpression="\w{6,15}" ErrorMessage="The password should be in a correct format and the length should be more than 6 and less than 15."
                                ControlToValidate="txtNewPassword"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtNewPassword"
                                Display="Dynamic" SetFocusOnError="True" ErrorMessage="Please input new password."></asp:RequiredFieldValidator>
                        </ContentTemplate>
                    </vs:FormItem>
                    <vs:FormItem HeaderText="Confirm Password">
                        <ContentTemplate>
                            <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password" TabIndex="30" MaxLength="50"></asp:TextBox>
                            <Ucc:Requiredmark runat="server" />
                            <asp:RequiredFieldValidator ID="CompareValidator1" runat="server" ControlToValidate="txtConfirmPassword"
                                SetFocusOnError="True" ErrorMessage="Please confirm the new password." Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtConfirmPassword"
                                ControlToCompare="txtNewPassword" SetFocusOnError="True" ErrorMessage="The new passwords are not the same."
                                Display="Dynamic"></asp:CompareValidator>
                        </ContentTemplate>
                    </vs:FormItem>
                    <vs:FormItem HeaderVisible="false">
                        <ContentTemplate>
                            <asp:Button ID="btnSave" Text="Save" runat="server" OnClick="btnSave_Click" Style="margin-top: 6px;
                                margin-left: 160px;" />
                        </ContentTemplate>
                    </vs:FormItem>
                </Items>
            </vs:FormPanel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
